<template>
  <div class="essay-container">
      <div class="title-container">
        <h1 class="title">
           用户管理
        </h1>
      </div>
      <el-form ref="dataForm"
        :rules="rules"
        :model="pass"
        label-width="100px"
        style="width:400px; margin-left:20px"
      >
      <el-form-item label="密码" prop="pass">
            <el-input v-model="data.pass" />
        </el-form-item>
        <el-form-item label="确认密码" prop="checkpass">
            <el-input v-model="data.checkpass" />
        </el-form-item>
      </el-form> 
      <el-button type="primary" @click="updateData">
          提交
      </el-button>
  </div>    
</template>

<script>
export default {
  name:'useradmin',
  data(){
    const validatePass = (rule,value,callback) =>{
            if(!value){
                 callback(new Error('友链名称不允许为空'));
            }else{
              if(this.dataForm.checkpass){
                this.$refs.dataForm.validateField('checkpass')
              }
                callback()
            }
        }
    },
    const validatePass = (rule,value,callback) =>{
            if(!value){
                 callback(new Error('友链名称不允许为空'));
            }else{
              if(this.dataForm.checkpass){
                this.$refs.dataForm.validateField('checkpass')
              }
                callback()
            }
        }
    },
    return:{
      
    }
}
</script>

<style>

</style>